<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function MaxDivisor ( a , b ) {
            var temp = a ; 
            if ( b > a ) {
                a = b ;
                b = temp ; 
            }
            while ( a % b != 0 ) {
                temp = b ; 
                b = a % b ; 
                a = temp ; 
            }
            return b ; 
        }
        function MinMulti ( a , b ) {
            var res = MaxDivisor( a , b ) ;
            return a * b / res ;
        }   
        console.log(MinMulti(9,8));
    </script>
</body>
</html>